package com.docMan.utils;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class FileMoveService {
	private ExecutorService executorService = Executors.newFixedThreadPool(3);
	private static FileMoveService fileMoveService = new FileMoveService();

	public synchronized static FileMoveService getInstance() {
		if (fileMoveService != null) {
			return fileMoveService;
		} else {
			fileMoveService = new FileMoveService();
			return fileMoveService;
		}
	}

	public void move(Runnable fileMoverRunnable) {
		executorService.submit(fileMoverRunnable);
	}
}
